<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript">
	$(function() {
		$(".delete-news").click(function(e) {
			var entityId = $(this).attr('href');
			e.preventDefault();
			deleteEntity('news', entityId, '#news-action');
		});
	})
</script>
<body>
	<h3>${action}</h3>
	<c:forEach var="entity" items="${entities}">
		<div id="news-rest-result" class="entity-style">
			<article>
				<div class="content-news">
					<p>
						${entity.news}
						<c:if test="${isAdmin}">
							<a class="delete-news" href="${entity.id}">Del</a>
						</c:if>
					</p>
				</div>
				<div class="content-time">${entity.created}</div>
			</article>
		</div>
	</c:forEach>
</body>
